<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>Notes On Output Formats</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">
<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1">Notes On Output Formats</p>
<hr class="separator">
<div class="content">This section contains notes on using certain output formats in ChartDirector.
</div><p class="heading1a">Raster Only Graphics Primitives</p><div class="content">
For historical reasons, ChartDirector includes certain low level raster only graphics primitives. Examples are <a href="DrawArea.pixel.htm">DrawArea.pixel</a> and <a href="DrawArea.getPixel.htm">DrawArea.getPixel</a> which sets and gets a pixel from the frame buffer of the image, <a href="DrawArea.fill2.htm">DrawArea.fill2</a> and <a href="DrawArea.fill2.htm">DrawArea.fill2</a> which perform flood filling, and various non-affine transform functions. These functions have no effect in vector graphics formats such as SVG and PDF, and should not be used with these formats.<br><br>
ChartDirector does not use any raster only graphics primitive, so they will not affect charts created by ChartDirector. The above would only be a concern if your code is using the <a href="DrawArea.htm">DrawArea</a> object for custom drawing and the output is in a vector graphics format such as SVG or PDF.
</div><p class="heading1a">Fonts in PDF</p><div class="content">
When creating PDF, it is common to embed the fonts into the PDF output. In this way, the viewing computer can display the contents even if the computer does not have the necessary fonts installed.<br><br>
To embed a font in PDF, ChartDirector needs to know the path of the font file. However, in Java, a font is often specified using the font family name and style, not the filename. For example, "Verdana Bold Italic" can be used to specify a font instead of "verdanaz.ttf". There is no Java API that can determine the filename from the "family name". To locate the font file, on Windows and Mac OS X, ChartDirector will try to guess the font filename from the family name. If this is not successful, ChartDirector will scan the operating system font directories to create a map of font family names to filenames, then use the map to resolve the font filename.<br><br>
On Linux or many other operating systems, there is no standard font directory. In this case, ChartDirector will scan the directories specified in the "cd.fontpath" property if available. This property can be set using the "-D" flag in the Java command line or the Java System.setProperty API. In the latter case, the property must be specified before outputting any PDF, as ChartDirector will only attempt to scan the directory once when it is first needed.<br><br>
The following points can ensure  ChartDirector can find the font files:<br><br>
<ul>
<li> On systems that is not using Windows or Mac OS X, set up the "cd.fontpath" property to list out the font directories that contains the fonts available in Java.<br><br>
<li> Use font filename to specify the font instead of font family names and styles. In this way, ChartDirector would not need to map from the family name to the filename.<br><br>
<li> Do not use "logical fonts", such as "Dialog" or "SanSerif". These fonts are synthesized dynamically by Java from one or more real fonts, which can be different for different systems. They cannot be embedded in PDF.<br></ul>
</div><p class="heading1a">Drop Shadows in PDF</p><div class="content">
ChartDirector currently does not support drop shadows in PDF. If a drop shadow is added, extra margins may be included in the output to accommodate the drop shadow, but the shadow will not appear.</div><br>
<hr class="separator"><div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div></body>
</HTML>
